package cn.wizzer.app.user.modules.services;

import cn.wizzer.app.user.modules.models.LiveBroadcast;
import cn.wizzer.app.user.modules.models.vo.LiveInfo;
import cn.wizzer.framework.base.Result;
import cn.wizzer.framework.base.service.BaseService;
import cn.wizzer.framework.page.Pagination;

public interface LiveBroadcastService extends BaseService<LiveBroadcast> {

    Result start(String matchId, String videoId, String appid, String notice, String title, String imgUri, String categoryId);

    Result end(String appid);

    Result myLive(String videoId, String appid, Integer pageNo, Integer pageSize);

    /**
     * @param code 官方数据则为数据字典code查询或name查询，若用户直播数据且非赛事直播则可能为name或父级name查询
     * @return
     */
    Result getLiveList(String code);

    /**
     * 根据key修改labels属性
     * @param key
     * @param labels
     * @param useOld
     */
    void updateLabelsByLiveNo(String key, String labels, String matchId, boolean useOld);

    Object liveMember(String liveNo);

    void cover(String liveNo, String format);

    Pagination getLiveList(String code, String searchKeyword, int pageNumber, int pageSize);

    Result getLive(String id);

    /**
     * 根据videoId修改直播数据中labels属性
     * @param videoId
     * @param labels
     */
    void updateLabelsByVideoId(String videoId, String labels);

    /**
     * 获取直播数据缓存
     * @param id
     * @return
     */
    LiveInfo hget(String id);

    Result removeLive(String id);

    Result getLiveByCode(String code);

    Pagination search(String keyword, int pageNo, int pageSize);

    Result unRemoveLive(String streamId);

    void refreshLive();
}
